/**
 * @author : andy
 * @description : 路由入口
 */
import staticRoutes from "./static";
import dynamicRoutes from "./dynamic";
import notFoundRoute from "./not-found";
import { traverseTreeValues } from "../utils";
import type { RouteRecordRaw } from "vue-router";
const routes: RouteRecordRaw[] = [
  ...staticRoutes,
  notFoundRoute
];
// 路由白名单名称列表，我们只是保存路由的名称，所以在配置路由的时候，一定要配置name
const routeWhitelist = traverseTreeValues(staticRoutes , node => node.name);
export {
  routes,
  dynamicRoutes,
  routeWhitelist
}